<template>
    <div>
        <h2 class="title">{{message}}</h2>
        <button @click="btnClick">按钮</button>
        <h2>{{name}}</h2>
        <Cpn/>
    </div>
</template>

<script>

import Cpn from './Cpn'

export default {
    name:'app',
    data() {
        return {
            message: 'vuejs',
            name:'我是App组件的name'
        };
    },
    methods: {
        btnClick() {
            console.log("点击按钮")
        },
    },
    components:{
        Cpn
    }
}
</script>

<style scoped>
    .title{
        color: green;
    }
</style>